<?php

namespace App\Http\Controllers;


use App\Models\RegionModel;
use App\Services\Strategy\ScrollImg;
use Illuminate\Http\Request;

class ScrollImgController extends Controller
{
    public function scrollImgShow(Request $request)
    {
        $type = $request->post('site');
        $data = RegionModel::where('region',$type)->get()->toArray();
        $district_id = $data[0]['district_id'];
        $res = new ScrollImg();
        $we = $res->provinceSelect($type,$district_id);
        $scroll_img = $we[0]['scroll_img'];
        return ['code'=>200,'msg'=>'轮播图渲染成功','data'=>$scroll_img];
    }
}
